wayland: fix xdg_surface test in move/resize drag
authorOlivier Fourdan <ofourdan@redhat.com>
Fri, 2 Jun 2017 13:54:50 +0000 (15:54 +0200)
committerOlivier Fourdan <ofourdan@redhat.com>
Fri, 2 Jun 2017 14:19:00 +0000 (16:19 +0200)
begin_resize_drag() and begin_move_drag() check for xdg_surface being
not null, but those apply on xdg_toplevel so they should check for
xdg_toplevel being non-null instead.

https://bugzilla.gnome.org/show_bug.cgi?id=781945

gdk/wayland/gdkwindow-wayland.c

index 6e78de860ba20a862c5c2b01c61bd627c6bac6fd..cefb53969b8f45aae84ccf9c228a72a56051c201 100644 (file)
@@ -3399,7 +3399,7 @@ gdk_wayland_window_begin_resize_drag (GdkWindow     *window,
 
   impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
 
-  if (!impl->display_server.xdg_surface)
+  if (!impl->display_server.xdg_toplevel)
     return;
 
   serial = _gdk_wayland_seat_get_last_implicit_grab_serial (gdk_device_get_seat (device),
@@ -3436,7 +3436,7 @@ gdk_wayland_window_begin_move_drag (GdkWindow *window,
 
   impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
 
-  if (!impl->display_server.xdg_surface)
+  if (!impl->display_server.xdg_toplevel)
     return;
 
   serial = _gdk_wayland_seat_get_last_implicit_grab_serial (gdk_device_get_seat (device),